/***
 * @常量路由
 */
export const Layout = () => import("@/views/Layout/index.vue")
export const constRouter = [
  {
    path: "/login",
    meta: { title: "登录", icon: "", isShow: false },
    component: () => import("@/views/Login/index.vue"),
  },
  {
    path: "/",
    redirect: "/home",
    name: "layout",
    meta: { title: "", icon: "", isShow: false },
    component: Layout,
    children: [
      {
        path: "/home",
        name: "home",
        meta: { title: "首页", icon: "House", isShow: true },
        component: () => import("@/views/Home/index.vue"),
      },
    ],
  },
  {
    path: "/404",
    meta: { title: "404", isShow: false },
    component: () => import("@/views/404/index.vue"),
  },
]
/****
 * @异步路由也叫权限路由
 */
export const asyncRouter = [
  {
    path: "/pub",
    name: "pub",
    redirect: "/pub/dataSource",
    meta: { title: "公共模块", icon: "Suitcase", isShow: true },
    component: Layout,
    children: [
      {
        path: "/pub/dataSource",
        name: "dataSource",
        meta: { title: "数据源配置 ", icon: "Coin", isShow: true },
        component: () => import("@/views/Pub/dataSource/index.vue"),
      },
      {
        path: "/pub/middleware",
        name: "middleware",
        meta: { title: "中间件配置", icon: "Cpu", isShow: true },
        component: () => import("@/views/Pub/middleware/index.vue"),
      },
    ],
  },
  {
    path: "/sync",
    name: "sync",
    redirect: "/sync/dataSyncBaseConfig",
    meta: { title: "同步配置", icon: "Van", isShow: true },
    component: Layout,
    children: [
      {
        path: "/sync/dataSyncBaseConfig",
        name: "dataSyncBaseConfig",
        meta: { title: "数据同步配置 ", icon: "Coin", isShow: true },
        component: () => import("@/views/Sync/dataSyncBaseConfig/index.vue"),
      },
      {
        path: "/sync/dataSyncTableConfig",
        name: "dataSyncTableConfig",
        meta: { title: "同步规则配置 ", icon: "Coin", isShow: true },
        component: () => import("@/views/Sync/dataSyncTableConfig/index.vue"),
      },
    ],
  },
]
/***
 * @任意路由
 */
export const anyRouter = [
  //任意路由
  {
    path: "/:pathMatch(.*)*",
    // name: 'Any',
    meta: { title: "任意路由", isShow: false },
    redirect: "/404",
  },
]
